home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 11 / AMUG BBS in a Box Volume XI (April 1994) (MacWizards).iso / Files / Prog / D-G / FORTRAN Goodies.sit / FORTRAN Goodies / String Utilities / LTRIM.f < prev    next >
MacBinary  |  1990-12-05  |  1.8 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: LTRIM.f

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Freeze Frozen Compressed File (archive/freeze) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert MathVISION Formula (other/mathVISIONFormula) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Dec 5 12:03:13 1990, modified Wed Dec 5 12:03:13 1990, creator 'MPS ', type ASCII, 1259 bytes "LTRIM.f" , at 0x56b 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 4c 54 52 49 4d 2e | 66 00 00 00 00 00 00 00 |..LTRIM.|f.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 04 eb 00 | 00 01 7e a3 82 d8 d1 a3 |........|..~.....|
|00000060| 82 d8 d1 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 de 87 00 00 |........|........|
|00000080| 43 09 54 68 69 73 20 65 | 78 61 6d 70 6c 65 20 54 |C.This e|xample T|
|00000090| 72 69 6d 73 20 62 6c 61 | 6e 6b 73 20 6f 66 66 20 |rims bla|nks off |
|000000a0| 74 68 65 20 66 72 6f 6e | 74 20 6f 66 20 61 20 63 |the fron|t of a c|
|000000b0| 68 61 72 61 63 74 65 72 | 2e 0d 43 0d 43 09 20 20 |haracter|..C.C. |
|000000c0| 46 75 6e 63 74 69 6f 6e | 20 4c 54 52 49 4d 20 2d |Function| LTRIM -|
|000000d0| 20 0d 43 0d 43 09 09 54 | 61 6b 65 73 20 61 20 73 | .C.C..T|akes a s|
|000000e0| 74 72 69 6e 67 20 6f 72 | 20 61 20 63 68 61 72 61 |tring or| a chara|
|000000f0| 63 74 65 72 20 61 73 20 | 69 6e 70 75 74 2e 0d 43 |cter as |input..C|
|00000100| 0d 43 09 09 52 65 74 75 | 72 6e 73 20 61 20 50 61 |.C..Retu|rns a Pa|
|00000110| 73 63 61 6c 2d 74 79 70 | 65 20 73 74 72 69 6e 67 |scal-typ|e string|
|00000120| 20 61 73 20 61 20 72 65 | 73 75 6c 74 2e 0d 43 0d | as a re|sult..C.|
|00000130| 43 0d 43 09 45 78 61 6d | 70 6c 65 20 70 72 6f 76 |C.C.Exam|ple prov|
|00000140| 69 64 65 64 20 66 6f 72 | 20 6f 77 6e 65 72 73 20 |ided for| owners |
|00000150| 6f 66 20 4c 61 6e 67 75 | 61 67 65 20 53 79 73 74 |of Langu|age Syst|
|00000160| 65 6d 73 20 46 4f 52 54 | 52 41 4e 0d 43 09 a9 ca |ems FORT|RAN.C...|
|00000170| 31 39 39 30 20 4c 61 6e | 67 75 61 67 65 20 53 79 |1990 Lan|guage Sy|
|00000180| 73 74 65 6d 73 20 43 6f | 72 70 2e 0d 43 0d 43 09 |stems Co|rp..C.C.|
|00000190| 57 72 69 74 74 65 6e 20 | 62 79 20 53 74 65 76 65 |Written |by Steve|
|000001a0| 6e 20 48 6f 70 6b 69 6e | 73 0d 43 0d 09 73 74 72 |n Hopkin|s.C..str|
|000001b0| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 20 4c 54 52 |ing func|tion LTR|
|000001c0| 49 4d 28 43 68 61 72 5f | 53 74 72 5f 41 72 67 29 |IM(Char_|Str_Arg)|
|000001d0| 0d 0d 43 20 09 09 72 65 | 63 65 69 76 65 20 74 68 |..C ..re|ceive th|
|000001e0| 65 20 61 72 67 75 6d 65 | 6e 74 20 62 79 20 44 65 |e argume|nt by De|
|000001f0| 73 63 72 69 70 74 6f 72 | 0d 0d 09 73 74 72 75 63 |scriptor|...struc|
|00000200| 74 75 72 65 20 2f 44 65 | 73 63 52 65 63 2f 0d 09 |ture /De|scRec/..|
|00000210| 09 70 6f 69 6e 74 65 72 | 20 2f 63 68 61 72 61 63 |.pointer| /charac|
|00000220| 74 65 72 2a 31 2f 20 44 | 61 74 61 50 74 72 0d 09 |ter*1/ D|ataPtr..|
|00000230| 09 69 6e 74 65 67 65 72 | 2a 32 20 44 61 74 61 53 |.integer|*2 DataS|
|00000240| 69 7a 65 0d 09 09 69 6e | 74 65 67 65 72 2a 32 20 |ize...in|teger*2 |
|00000250| 53 79 6d 54 0d 09 65 6e | 64 20 73 74 72 75 63 74 |SymT..en|d struct|
|00000260| 75 72 65 0d 09 72 65 63 | 6f 72 64 20 2f 44 65 73 |ure..rec|ord /Des|
|00000270| 63 52 65 63 2f 20 43 68 | 61 72 5f 53 74 72 5f 41 |cRec/ Ch|ar_Str_A|
|00000280| 72 67 0d 0d 43 20 09 09 | 4c 6f 63 61 6c 20 44 65 |rg..C ..|Local De|
|00000290| 63 6c 61 72 61 74 69 6f | 6e 73 0d 0d 09 69 6e 74 |claratio|ns...int|
|000002a0| 65 67 65 72 2a 34 20 63 | 68 61 72 64 2c 73 74 72 |eger*4 c|hard,str|
|000002b0| 6e 67 64 0d 09 70 61 72 | 61 6d 65 74 65 72 20 28 |ngd..par|ameter (|
|000002c0| 63 68 61 72 64 3d 31 38 | 2c 73 74 72 6e 67 64 3d |chard=18|,strngd=|
|000002d0| 31 39 29 0d 09 70 6f 69 | 6e 74 65 72 20 2f 63 68 |19)..poi|nter /ch|
|000002e0| 61 72 61 63 74 65 72 2a | 31 2f 20 43 68 61 72 5f |aracter*|1/ Char_|
|000002f0| 53 74 72 5f 50 74 72 0d | 09 69 6e 74 65 67 65 72 |Str_Ptr.|.integer|
|00000300| 2a 34 20 73 69 7a 65 2c | 20 63 6f 75 6e 74 0d 0d |*4 size,| count..|
|00000310| 43 20 09 09 70 6f 69 6e | 74 20 74 6f 20 74 68 65 |C ..poin|t to the|
|00000320| 20 63 68 61 72 61 63 74 | 65 72 20 61 72 67 75 6d | charact|er argum|
|00000330| 65 6e 74 0d 0d 09 43 68 | 61 72 5f 53 74 72 5f 50 |ent...Ch|ar_Str_P|
|00000340| 74 72 20 3d 20 43 68 61 | 72 5f 53 74 72 5f 41 72 |tr = Cha|r_Str_Ar|
|00000350| 67 2e 44 61 74 61 50 74 | 72 0d 0d 43 20 09 09 44 |g.DataPt|r..C ..D|
|00000360| 65 63 69 64 65 20 69 66 | 20 41 72 67 75 6d 65 6e |ecide if| Argumen|
|00000370| 74 20 69 73 20 61 20 43 | 68 61 72 61 63 74 65 72 |t is a C|haracter|
|00000380| 20 6f 72 20 53 74 72 69 | 6e 67 20 0d 63 09 09 61 | or Stri|ng .c..a|
|00000390| 6e 64 20 73 74 6f 72 65 | 20 74 68 65 20 73 69 7a |nd store| the siz|
|000003a0| 65 0d 0d 09 69 66 20 28 | 43 68 61 72 5f 53 74 72 |e...if (|Char_Str|
|000003b0| 5f 41 72 67 2e 53 79 6d | 54 20 3d 20 73 74 72 6e |_Arg.Sym|T = strn|
|000003c0| 67 64 29 20 74 68 65 6e | 0d 09 09 73 69 7a 65 20 |gd) then|...size |
|000003d0| 3d 20 4d 49 4e 28 32 35 | 35 2c 69 63 68 61 72 28 |= MIN(25|5,ichar(|
|000003e0| 43 68 61 72 5f 53 74 72 | 5f 50 74 72 5e 29 29 0d |Char_Str|_Ptr^)).|
|000003f0| 09 09 43 68 61 72 5f 53 | 74 72 5f 50 74 72 20 3d |..Char_S|tr_Ptr =|
|00000400| 20 43 68 61 72 5f 53 74 | 72 5f 50 74 72 20 2b 20 | Char_St|r_Ptr + |
|00000410| 31 0d 09 65 6c 73 65 0d | 09 09 73 69 7a 65 20 3d |1..else.|..size =|
|00000420| 20 4d 49 4e 28 43 68 61 | 72 5f 53 74 72 5f 41 72 | MIN(Cha|r_Str_Ar|
|00000430| 67 2e 44 61 74 61 53 69 | 7a 65 2c 32 35 35 29 0d |g.DataSi|ze,255).|
|00000440| 09 65 6e 64 20 69 66 0d | 0d 43 09 09 63 6f 75 6e |.end if.|.C..coun|
|00000450| 74 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |t the nu|mber of |
|00000460| 62 6c 61 6e 6b 73 0d 0d | 09 63 6f 75 6e 74 20 3d |blanks..|.count =|
|00000470| 20 30 0d 09 64 6f 20 77 | 68 69 6c 65 20 28 28 63 | 0..do w|hile ((c|
|00000480| 6f 75 6e 74 20 3c 20 73 | 69 7a 65 29 20 2e 61 6e |ount < s|ize) .an|
|00000490| 64 2e 20 28 43 68 61 72 | 5f 53 74 72 5f 50 74 72 |d. (Char|_Str_Ptr|
|000004a0| 5e 20 3d 20 27 20 27 29 | 29 0d 09 09 43 68 61 72 |^ = ' ')|)...Char|
|000004b0| 5f 53 74 72 5f 50 74 72 | 20 3d 20 43 68 61 72 5f |_Str_Ptr| = Char_|
|000004c0| 53 74 72 5f 50 74 72 20 | 2b 20 31 0d 09 09 63 6f |Str_Ptr |+ 1...co|
|000004d0| 75 6e 74 20 3d 20 63 6f | 75 6e 74 20 2b 20 31 0d |unt = co|unt + 1.|
|000004e0| 09 65 6e 64 20 64 6f 0d | 0d 43 09 09 72 65 74 75 |.end do.|.C..retu|
|000004f0| 72 6e 20 74 68 65 20 74 | 72 69 6d 6d 65 64 20 61 |rn the t|rimmed a|
|00000500| 72 67 75 6d 65 6e 74 0d | 0d 09 69 66 20 28 63 6f |rgument.|..if (co|
|00000510| 75 6e 74 20 3c 20 73 69 | 7a 65 29 20 74 68 65 6e |unt < si|ze) then|
|00000520| 0d 09 09 4c 54 52 49 4d | 20 3d 20 43 68 61 72 5f |...LTRIM| = Char_|
|00000530| 53 74 72 5f 50 74 72 5e | 28 31 3a 28 73 69 7a 65 |Str_Ptr^|(1:(size|
|00000540| 2d 63 6f 75 6e 74 29 29 | 0d 09 65 6c 73 65 0d 09 |-count))|..else..|
|00000550| 09 4c 54 52 49 4d 20 3d | 20 27 27 0d 09 65 6e 64 |.LTRIM =| ''..end|
|00000560| 20 69 66 0d 09 0d 09 65 | 6e 64 0d 00 00 00 00 00 | if....e|nd......|
|00000570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000580| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000590| 72 4c 69 73 74 0d 45 78 | 70 6f 72 74 20 50 72 6f |rList.Ex|port Pro|
|000005a0| 6a 65 63 74 46 6f 75 6e | 64 0d 45 78 70 6f 72 74 |jectFoun|d.Export|
|000005b0| 07 4c 54 52 49 4d 2e 66 | 02 00 00 00 50 61 72 74 |.LTRIM.f|....Part|
|000005c0| 53 49 54 78 00 00 00 00 | 00 00 00 00 00 01 64 42 |SITx....|......dB|
|000005d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 a9 80 18 cf 00 00 | 00 00 00 00 01 7e 7c 20 |........|.....~| |
|00000600| 53 6f 72 74 20 2d 71 75 | 6f 74 65 20 2d 72 20 2d |Sort -qu|ote -r -|
|00000610| 64 20 2d 66 20 27 b6 27 | 27 34 2c 32 2c 33 2c 37 |d -f '.'|'4,2,3,7|
|00000620| 2c 35 2c 36 2c 31 27 b6 | 27 27 20 2d 66 73 20 27 |,5,6,1'.|'' -fs '|
|00000630| b6 27 27 20 2f 3a 27 b6 | 27 27 20 b3 20 44 65 76 |.'' /:'.|'' . Dev|
|00000640| 3a 4e 75 6c 6c 27 0d 41 | 6c 69 61 73 20 48 65 61 |:Null'.A|lias Hea|
|00000650| 64 65 72 73 4f 6e 20 27 | 09 41 64 64 4d 65 6e 75 |dersOn '|.AddMenu|
|00000660| 20 50 72 6a 20 27 b6 27 | 27 55 73 65 20 48 65 61 | Prj '.'|'Use Hea|
|00000670| 64 65 72 73 21 12 27 b6 | 27 27 20 48 65 61 64 65 |ders!.'.|'' Heade|
|00000680| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000690| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006a0| 00 00 00 00 00 00 00 06 | 00 04 00 2c 00 05 00 c2 |........|...,....|
|000006b0| 01 9c 00 2c 00 05 00 c2 | 01 9c a3 82 92 81 00 00 |...,....|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|000006d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 2d cc 74 |...L...L|...2.-.t|
|000006e0| 06 9e 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000006f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 2f 71 fc 00 00 |........|.../q...|
+--------+-------------------------+-------------------------+--------+--------+